

	#Title[ʏeS]
	#Text[ʏeS]
	#Image[]
	#ScriptVersion[2]
	#BGM[.\BGM3.mp3]
	#Player[FREE]
	script_enemy_main
	{
		let c=0;
		
		let movecount=0;
		let cx=GetCenterX();
		let cy=GetCenterY();
		let e=30;
		@Initialize
		{
			
			SetLife(2000);
			SetMovePosition02(cx,60,60);
			SetTimer(20);
			SetGraphicRect(1,1,48,48);
			LoadGraphic("script\img\2127578.png");
		}
			
		@MainLoop
		{
			
			if(c==60)
			{	let angle=GetAngleToPlayer();
				loop(7){
					loop(10){
					CreateShot01(GetX()+5,GetY(),7,angle,BLUE12,e);
					angle+=36;
						}
					e+=5;
					}
				e=30;
				c=50;
			}
				
			
			if(movecount==60) 
			{
	    			if(GetX()<=GetPlayerX())
	    				{SetMovePosition02(GetX()+50,rand(50,100),60);}
	   	 		else if(GetX()>GetPlayerX())
	    				{SetMovePosition02(GetX()-50,rand(50,100),60);}
	    				movecount = 0;
			}


			SetCollisionA(GetX(),GetY(),32);
			SetCollisionB(GetX(),GetY(),24);
			movecount++;
			c++;
				
		}

		@DrawLoop
		{
			
			SetTexture("script\img\2127578.png");
			DrawGraphic(GetX(),GetY());
		}
		
		@Finalize
		{
			loop(24) {
        		let x = GetX + rand(-64, 64);
       	 		let y = GetY + rand(-64, 64);
        		CreateItem(ITEM_SCORE, x, y);
			}
			DeleteGraphic("script\img\2127578.png");
		}
	}
  
